@extends('home.inc.common')
@section('title')
    <title>直播 - 奇异果聚合</title>
    <meta name="keywords" content="{{$p_cate->seo_key}}" />
    <meta name="description" content="{{$p_cate->seo_intro}}" />
    <link href="{{asset('home_new/css/libs.css')}}" rel="stylesheet" type="text/css" />
    <link href="{{asset('home_new/css/global.css')}}" rel="stylesheet" type="text/css" />
    <link href="{{asset('home_new/css/page2.css')}}" rel="stylesheet" type="text/css" />
    <link href="{{asset('home_new/css/page.css')}}" rel="stylesheet" type="text/css" />
    <link href="{{asset('home_new/css/qyg2016.css')}}" rel="stylesheet" type="text/css" />
    <link href="{{asset('home/js/skin/layer.css')}}" type="text/css" rel="stylesheet" />
    <link href="{{asset('home_new/css/loginPop.css')}}" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="{{asset('home/js/jquery-3.1.0.min.js')}}"></script>
    <script type="text/javascript" src="{{asset('pulgin/layer/layer.js')}}"></script>
    <script src="http://static.geetest.com/static/tools/gt.js"></script>
    <link rel="icon" href="{{asset('home_new/favicon.ico')}}" />
    <style>
        .series_list li {
            background: #f7f7f7;
        }
    </style>
@endsection
@section('content')
    <div class="wrap">
        <div id="main">
            @include('home.anchor.common-cates', ['cates' => $cates->map(function ($c) { return $c['cate'];})])
            <div class="media_content">
                <!-- 栏目分类box -->
                @foreach($cates as $cate)
                <div class="video_wrap">
                    <div class="index_title clear">
                        <div class="index_titleMain">
                            <a class="global_gaNode" href="{{ route('anchor.cate', [$cate['cate']->cate_id]) }}">
                                <h1>
                                    {{ $cate['cate']->cate_name }}
                                </h1>
                            </a>
                            <a class="global_gaNode index_titleMore" href="{{ route('anchor.cate', [$cate['cate']->cate_id]) }}">
                                MORE &gt;
                            </a>
                        </div>
                    </div>
                    <div class="video_series">
                        <div class="series_split_line">
                        </div>
                        <ul class="series_list clear">
                            @foreach($cate['items'] as $item)
                            <li class="series_item{{$loop->index}}">
                                <a href="{{ route('anchor.show', [$item->id]) }}" target="_blank" class="series_itemImg global_gaNode">
                                    <img src="{{ $item->cover }}" width="265" height="145">
                                    <span class="video_icon index_icons">
                                        </span>
                                    <div class="video_seriesCover"></div>
                                </a>
                                <a class="global_gaNode user_ub" href="{{ route('anchor.show', [$item->id]) }}" target="_blank" title="{{ $item->room_name }}">
                                    <span class="user_pic"><img src="{{ $item->avatar }}" alt=""></span>
                                    <h2 class="user_title">
                                        @if (mb_strlen($item->room_name) > 12)
                                        {{ mb_substr($item->room_name, 0, 11) }}..
                                        @else
                                            {{$item->room_name}}
                                        @endif
                                    </h2>
                                    <p>
                                        <span class="ub_name">{{ $item->name }}</span>
                                        <span class="ub_numb">{{ num2word($item->online) }}观众</span>
                                    </p>
                                </a>
                            </li>
                            @endforeach

                        </ul>
                    </div>
                </div>
                <!-- 栏目分类box -->
                @endforeach
                {{--<div class="wrap_go">--}}
                    {{--<span style="right: 160px;"></span>--}}
                    {{--<a href="javascript:;">加载更多</a>--}}
                {{--</div>--}}
            </div>
        </div>
    </div>
@endsection